
    TestCase
    (
        'ie.ondevice.objectkit.extension.FunctionTestCase'

    ,   {
            testLike: function () 
            {
                
                Vehicle.implement
                (
                    {
                        getWheels: function () {}
                    }
                );
                function Vehicle () 
                {
                    
                };
                
                AllTerrainVehicle.inherit(Vehicle).implement
                (
                    {
                        canTraverse: function (environment) {}
                    }
                );
                
                function AllTerrainVehicle () {};
                
                Car.implement
                (
                    
                    {
                        getWheels: function () 
                        {
                            return 4;
                        }
                    }
                );
                
                function Car () {};
                
                Motorbike.implement
                (
                    {
                        getWheels: function () 
                        {
                            return 2;
                        }
                    }
                );
                
                function Motorbike () {};
                
                Scrambler.inherit(Motorbike).implement
                (
                    {
                        canTraverse: function (environment)  
                        {
                            if ('field' === environment)
                                return true;
                              
                        }
                    }
                );
                
                function Scrambler () {};
                
                
                var car= new Car
                ,   bike= new Motorbike
                ,   scrambler= new Scrambler
                
                assertFalse('Car is not an instance of vehicle', Vehicle.is(car));
                assertFalse('Motorbike is not an instance of vehicle', Vehicle.is(bike));
                assertTrue('car is like a vehicle', Vehicle.like(car));
                assertTrue('bike is like a vehicale', Vehicle.like(bike));
                assertFalse('bike is not like an all terain vehicle', AllTerrainVehicle.like(bike));
                assertTrue('scrambler is an instance of bike', Motorbike.is(scrambler));
                assertTrue('scrambler is like a vehicle', Vehicle.like(scrambler));
                assertTrue('scrambler is like an all terrain vehicle', AllTerrainVehicle.like(scrambler));
                
                
            }
            
        ,   testIsSuperclassOf: function () 
            {
                
                function A () 
                {
                    
                };
                
                B.inherit(A);
                function B () 
                {
                    
                };
                
                function C () 
                {
                    
                };
                
                assertTrue('A is a superclass of B', A.isSuperclassOf(B));
                assertFalse('B is not a superclass of A', B.isSuperclassOf(A));
                assertFalse('A is not a superclass of itself', A.isSuperclassOf(A));
                assertFalse('A is not a superclass of C', A.isSuperclassOf(C));
                
            }
            
        ,   testIsSubclassOf: function () 
            {
                function A () 
                {
                    
                };
                
                B.inherit(A);
                function B () 
                {
                    
                };
                
                function C () 
                {
                    
                };
                
                assertTrue('B is a subclass of A', B.isSubclassOf(A));
                assertFalse('A is not a subclass of B', A.isSubclassOf(B));
                assertFalse('B is not a subclass of itself', B.isSubclassOf(B));
                assertFalse('B is not a subclass of C', B.isSubclassOf(C));
            }

        ,   testDefer: function () 
            {
                // TODO work out async testing for defer
                
                
            }
        }
    );